package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MemberSmsNotificationMapper;
import com.ruoyi.system.domain.MemberSmsNotification;
import com.ruoyi.system.service.IMemberSmsNotificationService;

/**
 * 会员短信通知配置，定义短信类型、推送开关及用途描述Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class MemberSmsNotificationServiceImpl implements IMemberSmsNotificationService
{
    @Autowired
    private MemberSmsNotificationMapper memberSmsNotificationMapper;

    /**
     * 通过id查询会员短信通知配置
     *
     * @param id 会员短信通知配置，定义短信类型、推送开关及用途描述主键
     * @return 会员短信通知配置，定义短信类型、推送开关及用途描述
     */
    @Override
    public MemberSmsNotification selectMemberSmsNotificationById(Long id)
    {
        return memberSmsNotificationMapper.selectMemberSmsNotificationById(id);
    }

    /**
     * 查询会员短信通知配置列表
     *
     * @param memberSmsNotification 会员短信通知配置，定义短信类型、推送开关及用途描述
     * @return 会员短信通知配置，定义短信类型、推送开关及用途描述
     */
    @Override
    public List<MemberSmsNotification> selectMemberSmsNotificationList(MemberSmsNotification memberSmsNotification)
    {
        return memberSmsNotificationMapper.selectMemberSmsNotificationList(memberSmsNotification);
    }

    /**
     * 新增会员短信通知配置
     *
     * @param memberSmsNotification 会员短信通知配置，定义短信类型、推送开关及用途描述
     * @return 结果
     */
    @Override
    public int insertMemberSmsNotification(MemberSmsNotification memberSmsNotification)
    {
        return memberSmsNotificationMapper.insertMemberSmsNotification(memberSmsNotification);
    }

    /**
     * 修改会员短信通知配置
     *
     * @param memberSmsNotification 会员短信通知配置，定义短信类型、推送开关及用途描述
     * @return 结果
     */
    @Override
    public int updateMemberSmsNotification(MemberSmsNotification memberSmsNotification)
    {
        return memberSmsNotificationMapper.updateMemberSmsNotification(memberSmsNotification);
    }

    /**
     * 通过id批量删除会员短信通知配置信息
     *
     * @param ids 需要删除的会员短信通知配置，定义短信类型、推送开关及用途描述主键
     * @return 结果
     */
    @Override
    public int deleteMemberSmsNotificationByIds(Long[] ids)
    {
        return memberSmsNotificationMapper.deleteMemberSmsNotificationByIds(ids);
    }

    /**
     * 通过id删除会员短信通知配置信息
     *
     * @param id 会员短信通知配置，定义短信类型、推送开关及用途描述主键
     * @return 结果
     */
    @Override
    public int deleteMemberSmsNotificationById(Long id)
    {
        return memberSmsNotificationMapper.deleteMemberSmsNotificationById(id);
    }
}
